﻿using System.Collections;
using System.Collections.Generic;

//------------------------------------------------------------
// shaco Framework
// Copyright © 2017-2021 chang.liu All rights reserved.
// Feedback: 449612236@qq.com
//------------------------------------------------------------

namespace shaco.Base
{
    /// <summary>
    /// 自定义excel数据加载类
    /// </summary>
    public interface IExcelDataLoader
    {
        /// <summary>
        /// 同步加载数据
        /// <param name="path">文件路径</param>
        /// <return>数据，如果为null表示加载失败</return>
        /// </summary>
        ExcelData Load(string path);

        /// <summary>
        /// 异步加载数据
        /// <param name="path">文件路径</param>
        /// <param name="callbackEnd">加载完毕回调</param>
        /// <param name="callbackProgress">加载进度回调，可以为空</param>
        /// </summary>
        void LoadAsync(string path, System.Action<ExcelData> callbackEnd, System.Action<float> callbackProgress = null);

        void UnLoad(IResourceHandle request);
    }
}